package com.reverie.controller;

import com.reverie.common.pojo.CommonResult;
import com.reverie.dto.req.UploadTokenParam;
import com.reverie.util.QiNiuUtil;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("common")
public class CommonController {

    @PostMapping("getUploadToken")
    public CommonResult<String> getUploadToken(@RequestBody UploadTokenParam uploadTokenParam){
        return CommonResult.data(QiNiuUtil.getUploadToken(uploadTokenParam.getKey()));
    }

}
